package com.dc.project.entity.map;

import com.dc.project.entity.po.TaskResultGenerate;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * TaskResultGenerateMapVo
 *
 * @author chenxueli
 * @date 2025-03-10 16:37:53
 */
@Schema(title = "任务最终材料生成记录" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class TaskResultGenerateMapVo extends BaseMap<TaskResultGenerate> implements Serializable {

    @Schema(title = "任务id")
    private Long taskId;

    @Schema(title = "详细信息id")
    private Long detailId;

    @Schema(title = "对应的材料项目id")
    private Long itemId;

    @Schema(title = "生成的文件名称")
    private String fileName;

    @Schema(title = "描述")
    private String description;

    @Schema(title = "材料id")
    private Long fileId;

    @Schema(title = "材料路径")
    private String filePath;

    @Schema(title = "解析状态 1=未开始 2=文件解析文本成功 3=文件解析文本失败")
    private Integer parseStatus;

    @Schema(title = "解析消息")
    private String parseMessage;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public TaskResultGenerateMapVo(@NonNull TaskResultGenerate entity) {
        super(entity);
        this.taskId = entity.getFkTaskId();
        this.detailId = entity.getFkDetailId();
        this.itemId = entity.getFkItemId();
        this.fileName = entity.getFileName();
        this.description = entity.getDescription();
        this.fileId = entity.getFkFileId();
        this.filePath = entity.getFilePath();
        this.parseStatus = entity.getParseStatus();
        this.parseMessage = entity.getParseMessage();
    }

}
